<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>用户消息管理</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form">
	<blockquote class="layui-elem-quote quoteBox">
		<form class="layui-form">
			<div class="layui-inline">
				<label class="layui-input-inline">消息标题：</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" id="title" placeholder="请输入消息标题" />
				</div>
				<label class="layui-input-inline">微信昵称：</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" id="nickName" placeholder="请输入微信昵称" />
				</div>
				<label class="layui-input-inline">手机号：</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" id="phone" placeholder="请输入手机号" />
				</div>
				<div class="layui-inline">
					<a class="layui-btn search_btn" data-type="reload">搜索</a>
				</div>
			</div>
		</form>
	</blockquote>
	<table id="entityList" lay-filter="entityList"></table>
</form>



<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/compont.js"></script>
<script type="text/javascript">
    layui.use(['form','layer','laydate','table','laytpl'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table;

        //列表
        var tableIns = table.render({
            elem: '#entityList',
            url : '/myNews/jsonList',
            cellMinWidth : 95,
            page : true,
            height : "full-125",
            limit : 20,
            method:'post',
            limits : [10,15,20,25],
            id : "entityList",
            cols : [[
                {type: 'numbers', title: '序号'},
                {field: 'nickName', title: '微信昵称',align:'center'},
                {field: 'phone', title: '手机号',align:'center'},
                {field: 'title', title: '消息标题',align:'center'},
                {field: 'content', title: '消息内容',align:'center'},
                {field: 'createTime', title: '创建时间', align:'center', templet:function(d){
                    return timeStamp2String(d.createTime);
                }, sort: true}
            ]]
        });

        //搜索
        $(".search_btn").on("click",function(){
            table.reload("entityList",{
                page: {
                    curr: 1 //重新从第 1 页开始
                },
                where: {
                    title: $("#title").val(),
                    nickName: $("#nickName").val(),
                    phone: $("#phone").val()
                }
            })
        });



    })
</script>
</body>
</html>